/**
 * @Description:
 * @Author: saqqdy
 * @LastEditors: saqqdy
 * @Date: 2021-07-18 00:39:35
 * @LastEditTime: 2021-07-18 12:01:24
 * @see https://webpack.js.org/configuration/dev-server/
 */
import isWindows from 'is-windows'

import { devServerProxyConfig } from './devServierProxy'

const defaultPort = 8080

const devServerHost = isWindows() ? '127.0.0.1' : '0.0.0.0'

export const devServerUrl = `http://${devServerHost}:${defaultPort}/`

export const devServerConfig = {
    publicPath: '/',
    port: defaultPort,
    historyApiFallback: true,
    headers: { 'Access-Control-Allow-Origin': '*' },
    proxy: devServerProxyConfig,
    hot: true,
    overlay: false,
    host: devServerHost
}
